package com.bt.dmdb.model;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity
@Table(name = "ODS_ORDER_KSU")
@SuppressWarnings("serial")
public class OrderKsu implements java.io.Serializable {

    private long id;
    private Order order;
    private OrderItem orderItem;
    private Long serviceRequestId;
    private Date crd;
    private String productType;
    private String productName;
    private String parentProductName;
    private String orderType;
    private String productscode;
    private Date supplierOrderDate;
    private Date supplierInstallDate;

    public OrderKsu() {
    }

    public OrderKsu(long id) {
        this.id = id;
    }

    public OrderKsu(long id, Order order, OrderItem orderItem, Long serviceRequestId, Date crd, String productType, String productName, String parentProductName, String orderType, String productscode, Date supplierOrderDate, Date supplierInstallDate) {
        this.id = id;
        this.order = order;
        this.orderItem = orderItem;
        this.serviceRequestId = serviceRequestId;
        this.crd = crd;
        this.productType = productType;
        this.productName = productName;
        this.parentProductName = parentProductName;
        this.orderType = orderType;
        this.productscode = productscode;
        this.supplierOrderDate = supplierOrderDate;
        this.supplierInstallDate = supplierInstallDate;
    }

    @Id
    @Column(name = "ID", unique = true, nullable = false, precision = 10, scale = 0)
    public long getId() {
        return this.id;
    }

    public void setId(long id) {
        this.id = id;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "ORDER_ID")
    public Order getOrder() {
        return this.order;
    }

    public void setOrder(Order order) {
        this.order = order;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "ORDER_ITEM_ID")
    public OrderItem getOrderItem() {
        return this.orderItem;
    }

    public void setOrderItem(OrderItem orderItem) {
        this.orderItem = orderItem;
    }

    @Column(name = "SERVICE_REQUEST_ID", precision = 10, scale = 0)
    public Long getServiceRequestId() {
        return this.serviceRequestId;
    }

    public void setServiceRequestId(Long serviceRequestId) {
        this.serviceRequestId = serviceRequestId;
    }

    @Temporal(TemporalType.DATE)
    @Column(name = "CRD", length = 7)
    public Date getCrd() {
        return this.crd;
    }

    public void setCrd(Date crd) {
        this.crd = crd;
    }

    @Column(name = "PRODUCT_TYPE", length = 50)
    public String getProductType() {
        return this.productType;
    }

    public void setProductType(String productType) {
        this.productType = productType;
    }

    @Column(name = "PRODUCT_NAME")
    public String getProductName() {
        return this.productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    @Column(name = "PARENT_PRODUCT_NAME")
    public String getParentProductName() {
        return this.parentProductName;
    }

    public void setParentProductName(String parentProductName) {
        this.parentProductName = parentProductName;
    }

    @Column(name = "ORDER_TYPE")
    public String getOrderType() {
        return this.orderType;
    }

    public void setOrderType(String orderType) {
        this.orderType = orderType;
    }

    @Column(name = "PRODUCTSCODE")
    public String getProductscode() {
        return this.productscode;
    }

    public void setProductscode(String productscode) {
        this.productscode = productscode;
    }

    @Temporal(TemporalType.DATE)
    @Column(name = "SUPPLIER_ORDER_DATE", length = 7)
    public Date getSupplierOrderDate() {
        return this.supplierOrderDate;
    }

    public void setSupplierOrderDate(Date supplierOrderDate) {
        this.supplierOrderDate = supplierOrderDate;
    }

    @Temporal(TemporalType.DATE)
    @Column(name = "SUPPLIER_INSTALL_DATE", length = 7)
    public Date getSupplierInstallDate() {
        return this.supplierInstallDate;
    }

    public void setSupplierInstallDate(Date supplierInstallDate) {
        this.supplierInstallDate = supplierInstallDate;
    }
}
